package com.antdesignbackend.backend.service.impl;

import com.antdesignbackend.backend.entity.EntryRecord;
import com.antdesignbackend.backend.entity.entityVo.EntryRecordVo;
import com.antdesignbackend.backend.mapper.EntryRecordMapper;
import com.antdesignbackend.backend.service.EntryRecordService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class EntryRecordServiceImpl extends ServiceImpl<EntryRecordMapper, EntryRecord> implements EntryRecordService {
    @Autowired
    EntryRecordMapper entryRecordMapper;
    @Override
    public List<EntryRecordVo> search(@Param(Constants.WRAPPER) QueryWrapper<EntryRecordVo> entryRecordVoQueryWrapper, Page<EntryRecordVo> entryRecordVoPage){
        return entryRecordMapper.search(entryRecordVoQueryWrapper,entryRecordVoPage);
    };
    public Integer count(@Param(Constants.WRAPPER) QueryWrapper<EntryRecordVo> entryRecordVoQueryWrapper){
        return entryRecordMapper.count(entryRecordVoQueryWrapper);
    };
}
